<template>
  <div class="articleModel">
    <el-button @click="add">添加</el-button>
    <el-button @click="deleteRow(data.$index)">删除</el-button>

    <el-table :data="data">
      <el-table-column prop="name">
        <template slot-scope="scope">
          <el-input v-model="data[scope.$index].name">{{data}}</el-input>
        </template>
      </el-table-column>
      
    </el-table>
  </div>
</template>


<script>

  export default {
    data() {
      return {
        data: [],
        
      }
    },
    methods: {
      add() {
        this.data.push({});
      },
      deleteRow(index) {
        this.data.splice(index, 1);
      }

    },

    
  }

</script>

<style>
.articleModel el-table  td, th{
    border: none;
  
}
.articleModel el-table-column {
   border: none;
}
  .articleModel input {
    border: none;

  }

</style>
